package cn.tx.service.impl.annotation.enums;


/**
 * 设备属性数据类型
 * @author huying
 *
 */

public enum AnalogDataTypeEnum {
    ATTRIBUTE("属性数据", 1),

    ANALOG("采样数据", 2),

    ;
    public final String name;
    public final int value;

    AnalogDataTypeEnum(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public static AnalogDataTypeEnum getAvType(int value) {
        for(AnalogDataTypeEnum type: values()) {
            if(type.value == value) {
                return type;
            }
        }
        return null;
    }

}
